package com.cost.common;


import com.rmb.mart.utils.SendSms;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.HashMap;

/**
 * @author VULCAN
 */
@Component
@RabbitListener(queuesToDeclare = @Queue(Status.QUEUE))
public class SmsListener {

    @RabbitHandler
    public void getSms(HashMap<String,String> map){
        SendSms.sendMag(map.get("phone"),map.get("message"));
    }

}
